package com.example.mybatisstudy.controller;

import com.example.mybatisstudy.service.TransactionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/tx")
public class TransactionController {

    @Autowired
    private TransactionService transactionService;

    @RequestMapping("/shoudong")
    public Object shoudong(Integer id){
        return transactionService.shoudong(id);
    }

    @RequestMapping("/shengming")
    public Object shengming(Integer id){
        return transactionService.shengming(id);
    }

    @RequestMapping("/required")
    public Object required(){
        return transactionService.required1();
    }

    @RequestMapping("/nested")
    public Object nested(){
        return transactionService.nested1();
    }
}
